home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / misc / HWGRCSmanp12f.lha / HWGRCS / hwgrcs / man / co.man < prev    next >
Text File  |  1993-01-19  |  17KB  |  463 lines

  1.  
  2.  
  3.  
  4. CO(1)                    USER COMMANDS                      CO(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      co - check out RCS revisions
  10.  
  11. SYNOPSIS
  12.      co [_o_p_t_i_o_n_s] _f_i_l_e ...
  13.  
  14. DESCRIPTION
  15.      co retrieves a revision from each RCS  file  and  stores  it
  16.      into the corresponding working file.
  17.  
  18.      Pathnames matching an RCS suffix denote RCS files; all  oth-
  19.      ers  denote working files.  Names are paired as explained in
  20.      ci(1).
  21.  
  22.      Revisions of an RCS  file  may  be  checked  out  locked  or
  23.      unlocked.   Locking a revision prevents overlapping updates.
  24.      A revision checked out for reading or processing (e.g., com-
  25.      piling)  need  not  be  locked.   A revision checked out for
  26.      editing and later checkin must normally be locked.  Checkout
  27.      with  locking  fails  if  the  revision to be checked out is
  28.      currently locked by another user.  (A  lock  may  be  broken
  29.      with  rcs(1).)   Checkout  with  locking  also  requires the
  30.      caller to be on the access list of the RCS file,  unless  he
  31.      is  the  owner  of  the file or the superuser, or the access
  32.      list is empty.  Checkout without locking is not  subject  to
  33.      accesslist restrictions, and is not affected by the presence
  34.      of locks.
  35.  
  36.      A revision is selected by options  for  revision  or  branch
  37.      number,  checkin  date/time,  author,  or  state.   When the
  38.      selection options are applied in combination,  co  retrieves
  39.      the  latest revision that satisfies all of them.  If none of
  40.      the selection options is specified, co retrieves the  latest
  41.      revision  on the default branch (normally the trunk, see the
  42.      -b option of rcs(1)).  A revision or branch  number  may  be
  43.      attached  to  any of the options -f, -I, -l, -M, -p, -q, -r,
  44.      or -u.  The options -d (date), -s (state), and  -w  (author)
  45.      retrieve from a single branch, the _s_e_l_e_c_t_e_d branch, which is
  46.      either specified by one of  -f,  ...,  -u,  or  the  default
  47.      branch.
  48.  
  49.      A co command applied  to  an  RCS  file  with  no  revisions
  50.      creates a zero-length working file.  co always performs key-
  51.      word substitution (see below).
  52.  
  53. OPTIONS
  54.      -r[_r_e_v]
  55.           retrieves the latest revision whose number is less than
  56.           or  equal to _r_e_v. If _r_e_v indicates a branch rather than
  57.           a revision, the  latest  revision  on  that  branch  is
  58.           retrieved.   If  _r_e_v is omitted, the latest revision on
  59.           the default branch (see the -b  option  of  rcs(1))  is
  60.  
  61.  
  62.  
  63. GNU                  Last change: 1991/08/19                    1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CO(1)                    USER COMMANDS                      CO(1)
  71.  
  72.  
  73.  
  74.           retrieved.   If  _r_e_v  is  $, co determines the revision
  75.           number from keyword values in the working file.  Other-
  76.           wise,  a revision is composed of one or more numeric or
  77.           symbolic fields  separated  by  periods.   The  numeric
  78.           equivalent of a symbolic field is specified with the -n
  79.           option of the commands ci(1) and rcs(1).
  80.  
  81.      -l[_r_e_v]
  82.           same as -r, except that it  also  locks  the  retrieved
  83.           revision for the caller.
  84.  
  85.      -u[_r_e_v]
  86.           same as -r, except that it unlocks the retrieved  revi-
  87.           sion  if  it was locked by the caller.  If _r_e_v is omit-
  88.           ted, -u retrieves the revision locked by the caller, if
  89.           there  is one; otherwise, it retrieves the latest revi-
  90.           sion on the default branch.
  91.  
  92.      -f[_r_e_v]
  93.           forces the overwriting of the working file;  useful  in
  94.           connection with -q.  See also FILE MODES below.
  95.  
  96.      -kkv Generate keyword strings using the default  form,  e.g.
  97.           $Revision:  5.7 $ for the Revision keyword.  A locker's
  98.           name is inserted in the value of the  Header,  Id,  and
  99.           Locker  keyword strings only as a file is being locked,
  100.           i.e. by ci -l and co -l.  This is the default.
  101.  
  102.      -kkvl
  103.           Like -kkv,  except  that  a  locker's  name  is  always
  104.           inserted if the given revision is currently locked.
  105.  
  106.      -kk  Generate only keyword names in  keyword  strings;  omit
  107.           their  values.   See  KEYWORD  SUBSTITUTION below.  For
  108.           example, for the Revision keyword, generate the  string
  109.           $Revision$ instead of $Revision: 5.7 $.  This option is
  110.           useful to ignore differences due to  keyword  substitu-
  111.           tion when comparing different revisions of a file.
  112.  
  113.      -ko  Generate the old keyword string, present in the working
  114.           file  just  before it was checked in.  For example, for
  115.           the Revision keyword, generate  the  string  $Revision:
  116.           1.1  $  instead  of $Revision: 5.7 $ if that is how the
  117.           string appeared when the file was checked in.  This can
  118.           be  useful for binary file formats that cannot tolerate
  119.           any changes to substrings that happen to take the  form
  120.           of keyword strings.
  121.  
  122.      -kv  Generate only keyword values for keyword strings.   For
  123.           example,  for the Revision keyword, generate the string
  124.           5.7 instead of $Revision: 5.7 $.  This  can  help  gen-
  125.           erate  files  in programming languages where it is hard
  126.  
  127.  
  128.  
  129. GNU                  Last change: 1991/08/19                    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CO(1)                    USER COMMANDS                      CO(1)
  137.  
  138.  
  139.  
  140.           to strip keyword delimiters like  $Revision: $  from  a
  141.           string.   However,  further keyword substitution cannot
  142.           be performed once the keyword  names  are  removed,  so
  143.           this  option should be used with care.  Because of this
  144.           danger of losing keywords, this option cannot  be  com-
  145.           bined  with  -l,  and the owner write permission of the
  146.           working file is turned off; to  edit  the  file  later,
  147.           check it out again without -kv.
  148.  
  149.      -p[_r_e_v]
  150.           prints the retrieved revision on  the  standard  output
  151.           rather  than  storing  it  in  the  working file.  This
  152.           option is useful when co is part of a pipe.
  153.  
  154.      -q[_r_e_v]
  155.           quiet mode; diagnostics are not printed.
  156.  
  157.      -I[_r_e_v]
  158.           interactive mode; the user is prompted  and  questioned
  159.           even if the standard input is not a terminal.
  160.  
  161.      -d_d_a_t_e
  162.           retrieves the latest revision on  the  selected  branch
  163.           whose  checkin date/time is less than or equal to _d_a_t_e.
  164.           The date and time may be given  in  free  format.   The
  165.           time  zone  LT stands for local time; other common time
  166.           zone names are understood.  For example, the  following
  167.           _d_a_t_es are equivalent if local time is January 11, 1990,
  168.           8pm Pacific Standard Time, eight hours west of  Coordi-
  169.           nated Universal Time (UTC):
  170.  
  171.                8:00 pm lt
  172.                4:00 AM, Jan. 12, 1990           note: default is UTC
  173.                1990/01/12 04:00:00              RCS date format
  174.                Thu Jan 11 20:00:00 1990 LT      output of ctime(3) + LT
  175.                Thu Jan 11 20:00:00 PST 1990     output of date(1)
  176.                Fri Jan 12 04:00:00 GMT 1990
  177.                Thu, 11 Jan 1990 20:00:00 -0800
  178.                Fri-JST, 1990, 1pm Jan 12
  179.                12-January-1990, 04:00-WET
  180.  
  181.           Most fields in the date and time may be defaulted.  The
  182.           default  time  zone  is  UTC.   The  other defaults are
  183.           determined in the order year, month, day, hour, minute,
  184.           and  second  (most to least significant).  At least one
  185.           of these fields must be provided.  For  omitted  fields
  186.           that  are  of higher significance than the highest pro-
  187.           vided  field,  the  time  zone's  current  values   are
  188.           assumed.  For all other omitted fields, the lowest pos-
  189.           sible values are assumed.  For example,  the  date  20,
  190.           10:30  defaults  to 10:30:00 UTC of the 20th of the UTC
  191.           time zone's current month and year.  The date/time must
  192.  
  193.  
  194.  
  195. GNU                  Last change: 1991/08/19                    3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CO(1)                    USER COMMANDS                      CO(1)
  203.  
  204.  
  205.  
  206.           be quoted if it contains spaces.
  207.  
  208.      -M[_r_e_v]
  209.           Set the modification time on the new working file to be
  210.           the  date  of  the retrieved revision.  Use this option
  211.           with care; it can confuse make(1).
  212.  
  213.      -s_s_t_a_t_e
  214.           retrieves the latest revision on  the  selected  branch
  215.           whose state is set to _s_t_a_t_e.
  216.  
  217.      -w[_l_o_g_i_n]
  218.           retrieves the latest revision on  the  selected  branch
  219.           which was checked in by the user with login name _l_o_g_i_n.
  220.           If the argument _l_o_g_i_n is omitted, the caller's login is
  221.           assumed.
  222.  
  223.      -j_j_o_i_n_l_i_s_t
  224.           generates a new revision which is the join of the revi-
  225.           sions  on _j_o_i_n_l_i_s_t. This option is largely obsoleted by
  226.           rcsmerge(1) but is retained for  backwards  compatibil-
  227.           ity.
  228.  
  229.           The _j_o_i_n_l_i_s_t is a comma-separated list of pairs of  the
  230.           form  _r_e_v_2:_r_e_v_3,  where  _r_e_v_2 and _r_e_v_3 are (symbolic or
  231.           numeric) revision numbers.  For the initial such  pair,
  232.           _r_e_v_1 denotes the revision selected by the above options
  233.           -f, ..., -w.  For all other  pairs,  _r_e_v_1  denotes  the
  234.           revision  generated  by  the previous pair.  (Thus, the
  235.           output of one join becomes the input to the next.)
  236.  
  237.           For each pair, co joins revisions _r_e_v_1  and  _r_e_v_3  with
  238.           respect  to  _r_e_v_2.  This  means  that  all changes that
  239.           transform _r_e_v_2 into _r_e_v_1 are applied to a copy of _r_e_v_3.
  240.           This  is  particularly  useful if _r_e_v_1 and _r_e_v_3 are the
  241.           ends of two branches that have _r_e_v_2 as a common  ances-
  242.           tor.   If  _r_e_v_1<_r_e_v_2<_r_e_v_3  on  the same branch, joining
  243.           generates a new revision which is like _r_e_v_3,  but  with
  244.           all  changes  that  lead  from _r_e_v_1 to _r_e_v_2 undone.  If
  245.           changes from _r_e_v_2 to _r_e_v_1  overlap  with  changes  from
  246.           _r_e_v_2  to  _r_e_v_3,  co  reports  overlaps  as described in
  247.           merge(1).
  248.  
  249.           For the initial pair, _r_e_v_2 may be omitted.  The default
  250.           is  the common ancestor.  If any of the arguments indi-
  251.           cate branches, the latest revisions on  those  branches
  252.           are  assumed.   The  options  -l  and -u lock or unlock
  253.           _r_e_v_1.
  254.  
  255.      -V_n  Emulate RCS version _n, where _n may be 3, 4, or 5.  This
  256.           may  be useful when interchanging RCS files with others
  257.           who are running older versions of RCS.   To  see  which
  258.  
  259.  
  260.  
  261. GNU                  Last change: 1991/08/19                    4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CO(1)                    USER COMMANDS                      CO(1)
  269.  
  270.  
  271.  
  272.           version  of  RCS  your correspondents are running, have
  273.           them invoke rlog on an RCS file; if none of  the  first
  274.           few  lines  of  output contain the string branch: it is
  275.           version 3; if the dates' years have just two digits, it
  276.           is  version 4; otherwise, it is version 5.  An RCS file
  277.           generated while  emulating  version  3  will  lose  its
  278.           default  branch.   An RCS revision generated while emu-
  279.           lating version 4 or earlier will have a timestamp  that
  280.           is  off  by up to 13 hours.  A revision extracted while
  281.           emulating version 4 or earlier will  contain  dates  of
  282.           the  form  _y_y/_m_m/_d_d  instead of _y_y_y_y/_m_m/_d_d and may also
  283.           contain different white space in the  substitution  for
  284.           $Log$.
  285.  
  286.      -x_s_u_f_f_i_x_e_s
  287.           Use _s_u_f_f_i_x_e_s to characterize RCS files.  See ci(1)  for
  288.           details.
  289.  
  290. KEYWORD SUBSTITUTION
  291.      Strings of the form $_k_e_y_w_o_r_d$ and $_k_e_y_w_o_r_d:...$ embedded  in
  292.      the   text   are   replaced   with   strings   of  the  form
  293.      $_k_e_y_w_o_r_d:_v_a_l_u_e$ where _k_e_y_w_o_r_d and  _v_a_l_u_e  are  pairs  listed
  294.      below.   Keywords may be embedded in literal strings or com-
  295.      ments to identify a revision.
  296.  
  297.      Initially, the user enters strings of  the  form  $_k_e_y_w_o_r_d$.
  298.      On  checkout,  co replaces these strings with strings of the
  299.      form $_k_e_y_w_o_r_d:_v_a_l_u_e$.  If a revision containing  strings  of
  300.      the latter form is checked back in, the value fields will be
  301.      replaced during the next checkout.  Thus, the keyword values
  302.      are  automatically updated on checkout.  This automatic sub-
  303.      stitution can be modified by the -k options.
  304.  
  305.      Keywords and their corresponding values:
  306.  
  307.      $Author$
  308.           The login name of the user who checked in the revision.
  309.  
  310.      $Date$
  311.           The date and time (UTC) the revision was checked in.
  312.  
  313.      $Header$
  314.           A standard header containing the full pathname  of  the
  315.           RCS  file,  the  revision  number,  the date (UTC), the
  316.           author, the state, and the locker (if locked).
  317.  
  318.      $Id$ Same as $Header$,  except  that  the  RCS  filename  is
  319.           without a path.
  320.  
  321.      $Locker$
  322.           The login name of the  user  who  locked  the  revision
  323.           (empty if not locked).
  324.  
  325.  
  326.  
  327. GNU                  Last change: 1991/08/19                    5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. CO(1)                    USER COMMANDS                      CO(1)
  335.  
  336.  
  337.  
  338.      $Log$
  339.           The log message supplied during checkin, preceded by  a
  340.           header   containing  the  RCS  filename,  the  revision
  341.           number, the author, and the date (UTC).   Existing  log
  342.           messages  are  _n_o_t replaced.  Instead, the new log mes-
  343.           sage is inserted after $Log:...$.  This is  useful  for
  344.           accumulating a complete change log in a source file.
  345.  
  346.      $RCSfile$
  347.           The name of the RCS file without a path.
  348.  
  349.      $Revision$
  350.           The revision number assigned to the revision.
  351.  
  352.      $Source$
  353.           The full pathname of the RCS file.
  354.  
  355.      $State$
  356.           The state assigned to the revision with the  -s  option
  357.           of rcs(1) or ci(1).
  358.  
  359. FILE MODES
  360.      The working file inherits the read and  execute  permissions
  361.      from  the RCS file.  In addition, the owner write permission
  362.      is turned on, unless -kv is set or the file is  checked  out
  363.      unlocked and locking is set to strict (see rcs(1)).
  364.  
  365.      If a file with the name of the working file  exists  already
  366.      and  has  write  permission,  co aborts the checkout, asking
  367.      beforehand if possible.  If the existing working file is not
  368.      writable or -f is given, the working file is deleted without
  369.      asking.
  370.  
  371. FILES
  372.      co accesses files much as ci(1) does, except  that  it  does
  373.      not need to read the working file.
  374.  
  375. ENVIRONMENT
  376.      RCSINIT
  377.           options prepended to the argument  list,  separated  by
  378.           spaces.  See ci(1) for details.
  379.  
  380. DIAGNOSTICS
  381.      The RCS pathname, the working  pathname,  and  the  revision
  382.      number  retrieved are written to the diagnostic output.  The
  383.      exit status is zero if and only if all operations were  suc-
  384.      cessful.
  385.  
  386. IDENTIFICATION
  387.      Author: Walter F. Tichy.
  388.      Revision Number: 5.7; Release Date: 1991/08/19.
  389.      Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  390.  
  391.  
  392.  
  393. GNU                  Last change: 1991/08/19                    6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. CO(1)                    USER COMMANDS                      CO(1)
  401.  
  402.  
  403.  
  404.      Copyright c 1990, 1991 by Paul Eggert.
  405.  
  406. SEE ALSO
  407.      ci(1),  ctime(3),  date(1),   ident(1),   make(1),   rcs(1),
  408.      rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5)
  409.      Walter  F.  Tichy,  RCS--A  System  for   Version   Control,
  410.      _S_o_f_t_w_a_r_e--_P_r_a_c_t_i_c_e & _E_x_p_e_r_i_e_n_c_e 15, 7 (July 1985), 637-654.
  411.  
  412. LIMITS
  413.      Links to the RCS and working files are not preserved.
  414.  
  415.      There is no way to selectively  suppress  the  expansion  of
  416.      keywords,  except by writing them differently.  In nroff and
  417.      troff, this is done by embedding the null-character \&  into
  418.      the keyword.
  419.  
  420. BUGS
  421.      The -d option sometimes gets confused, and accepts  no  date
  422.      before 1970.
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459. GNU                  Last change: 1991/08/19                    7
  460.  
  461.  
  462.  
  463.